package cz.muni.fi.pa165.rentalofconstructionmachinery.dto;

import java.util.Date;

/**
 *
 * @author Adam Zmrzlý
 * @version Miura (20121101)
 *
 * Data transfer object for Revision entity (@see cz.muni.fi.pa165.rentalofconstructionmachinery.entity.Revision)
 */
public class RevisionDTO {
    private Long id;
    private MachineDTO machine;
    private Date date;
    private String comment;

    public RevisionDTO() {
    }

    public RevisionDTO(Long id, MachineDTO machine, Date date, String comment) {
        this.id = id;
        this.machine = machine;
        this.date = date;
        this.comment = comment;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public MachineDTO getMachine() {
        return machine;
    }

    public void setMachine(MachineDTO machine) {
        this.machine = machine;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final RevisionDTO other = (RevisionDTO) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 59 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}
